version: '3'

services:
     ovn-nb-create:
      image: 'ovn:20.06.90_rhel_branch-21.12'
      container_name: 'ovn-nb-tcp'
#      restart: always
      privileged: true
      hostname: '172.16.0.189' #部署机器的ip,非容器ip(因为是本地不是线上所以用ip，线上的话可以用域名)
      command: ovn-nb-tcp
      network_mode: "host"

          
      volumes:
         - ./var:/var/run/ovn
         - ./openvswitch:/etc/openvswitch
         - ./etc:/etc/ovn
         - ./ovslog:/var/log/openvswitch
         - ./obnlog:/var/log/ovn

     ovn-sb-create:
      image: 'ovn:20.06.90_rhel_branch-21.12'
      container_name: 'ovn-sb-tcp'
#      restart: always
      privileged: true
      hostname: '172.16.0.189' #部署机器的ip,非容器ip(因为是本地不是线上所以用ip，线上的话可以用域名)
      command: ovn-sb-tcp
      network_mode: "host"


      volumes:
         - ./var:/var/run/ovn
         - ./openvswitch:/etc/openvswitch
         - ./etc:/etc/ovn
         - ./ovslog:/var/log/openvswitch
         - ./obnlog:/var/log/ovn

     ovn-northd-create:
      image: 'ovn:20.06.90_rhel_branch-21.12'
      container_name: 'ovn-northd-tcp'
#      restart: always
      privileged: true
      hostname: '172.16.0.189' #部署机器的ip,非容器ip(因为是本地不是线上所以用ip，线上的话可以用域名)
      command: ovn-northd-tcp
      network_mode: "host"


      volumes:
         - ./var:/var/run/ovn
         - ./openvswitch:/etc/openvswitch
         - ./etc:/etc/ovn
         - ./ovslog:/var/log/openvswitch
         - ./obnlog:/var/log/ovn
